-- GENERATED SPELL FOR [Forlorn Spirit] --


function spell0_2044(pUnit, Event) --@Curse of Stalvan,n/a--
pUnit:FullCastSpellOnTarget(3105,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2044', 1000, 1)
end

function spell1_2044(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(118,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2044', 21500, 1)
end

function Sorts_2044(pUnit, Event)
local choix_sorts_2044 = math.random(0, 1)
if choix_sorts_2044 == 0 then
pUnit:RegisterEvent('spell0_2044', 1, 1)
end
if choix_sorts_2044 == 1 then
pUnit:RegisterEvent('spell1_2044', 1, 1)
end
end

function mob2044_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2044', math.random(1500, 3000), 1)
end

function mob2044_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2044_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2044_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2044, 1, 'mob2044_Action')
RegisterUnitEvent(2044, 2, 'mob2044_Leave')
RegisterUnitEvent(2044, 3, 'mob2044_Kill')
RegisterUnitEvent(2044, 4, 'mob2044_Die')
